Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global styles migration in partner dashboard #1450

Merged

Conversation

Yibaebi
Copy link
Contributor

@Yibaebi Yibaebi commented Sep 4, 2024

No description provided.

Copy link

coderabbitai bot commented Sep 4, 2024

Walkthrough

The pull request introduces a series of modifications across multiple components in the application. Key changes include the replacement of standard HTML elements with specialized components from the Ak component library, such as AkButton, AkTypography, and AkLink. Class names have been updated for consistency and readability, and several CSS classes have been removed or added to streamline styling. The overall structure of the components remains intact, with a focus on enhancing semantic markup and improving maintainability.

Changes

File Path Change Summary
app/components/partner/client-info/template.hbs Replaced <em> with AkTypography, updated link to AkLink, and added AkButton with AkIcon.
app/components/partner/client-list/index.hbs Changed class attributes for padding from padding-h-1 padding-b-2 to pb-4 px-2.
app/components/partner/client-plan/template.hbs Updated class names for <strong> elements for scans and projects from margin-r-h to mr-1.
app/components/partner/client-project-detail/index.hbs Replaced AkIcon with AppPlatformIcon and updated package name display to AkTypography.
app/components/partner/client-project-list/index.hbs Replaced <div> with AkStack and <AkTypography> for headers, improving layout and styling.
app/components/partner/client-project-list/index.scss Added new .badge class for styling badge elements.
app/components/partner/client-project-list/item/index.hbs Replaced <AkIcon> with <AppPlatformIcon> and updated date display to AkTypography.
app/components/partner/client-project-list/item/index.scss Removed .platform-android and .platform-apple, added .view-files-button.
app/components/partner/client-report-download/index.hbs Replaced standard buttons with AkButton and AkIconButton, improved layout for progress display.
app/components/partner/client-report-download/index.scss Updated .button-progress class and added .is-progress for animation.
app/components/partner/client-report-download/report-password/index.hbs Replaced standard buttons with AkIconButton and AkButton, improved structure for icons and text.
app/components/partner/client-uploads-list/index.hbs Updated structure with AkTypography components for improved styling.
app/components/partner/client-uploads-list/index.scss Removed .title and .app-name, added .badge.
app/components/partner/credit-transfer/index.hbs Transitioned to AkButton for transfer button, improved structure with AkTypography.
app/components/partner/credit-transfer/index.scss Removed .disabled-btn class.
app/templates/authenticated/partner/analytics.hbs Updated padding classes for improved readability.
app/templates/authenticated/partner/client.hbs Updated padding classes for improved readability.
tests/integration/components/partner/client-project-list-test.js Modified assertions for table headers to match new structure.
tests/integration/components/partner/client-uploads-list/component-test.js Updated selectors in assertions for accuracy.

Possibly related PRs

  • Account Settings MFA Global CSS Migration #1452: This PR involves a transition to using AkTypography and AkButton, similar to the main PR's updates, indicating a shared focus on enhancing UI consistency and maintainability through a component-based architecture.

Poem

🐰 In the land of code where rabbits play,
Components sprout in a stylish way.
AkButtons hop, and Typography sings,
A garden of changes, oh, what joy it brings!
With every update, the UI shines bright,
Hopping along, everything feels just right! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Yibaebi Yibaebi force-pushed the PD-1430-partner-dashboard-styles-refactor branch from 37f0637 to 88db578 Compare September 4, 2024 08:54
Copy link

cloudflare-workers-and-pages bot commented Sep 4, 2024

Deploying irenestaging with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc819a1
Status: ✅  Deploy successful!
Preview URL: https://760799e0.irenestaging.pages.dev
Branch Preview URL: https://pd-1430-partner-dashboard-st.irenestaging.pages.dev

View logs

Copy link

cypress bot commented Sep 4, 2024

Irene    Run #447

Run Properties:  status check passed Passed #447  •  git commit 3216b84a47 ℹ️: Merge 37f0637a48a20f93f58eeb011accc78a93f0792d into 5064f9f9fada86090e78415f2b07...
Project Irene
Branch Review PD-1430-partner-dashboard-styles-refactor
Run status status check passed Passed #447
Run duration 05m 55s
Commit git commit 3216b84a47 ℹ️: Merge 37f0637a48a20f93f58eeb011accc78a93f0792d into 5064f9f9fada86090e78415f2b07...
Committer Yibaebi Elliot
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 10
View all changes introduced in this branch ↗︎

@Yibaebi Yibaebi force-pushed the PD-1430-partner-dashboard-styles-refactor branch from 0fee04b to bc819a1 Compare September 12, 2024 10:22
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
app/components/partner/client-report-download/report-password/index.scss (1)

4-9: Avoid using !important if possible.

The focus state changes look good and improve the accessibility and user experience of the dropdown component. Using CSS variables for colors is also a good practice.

However, the use of !important to override the text color might indicate specificity issues in the stylesheet. Consider increasing the specificity of the selector instead, if possible.

&:focus {
  background-color: var(--secondary);
  border-color: var(--secondary);
- color: var(--common-white) !important;
+ color: var(--common-white);
}
app/components/partner/registration-request-pending/index.hbs (1)

32-33: Nitpick: Use the @emphasis prop of AkTypography instead of the <em> tag.

Consider using the @emphasis prop of AkTypography to emphasize the relative time instead of wrapping it in an <em> tag. This keeps the markup cleaner and aligns with the Atlaskit typography system.

-    <em>{{dayjs-from-now @request.createdOn}}</em>
+    {{dayjs-from-now @request.createdOn}}

And add the @emphasis prop to the AkTypography component:

   <AkTypography
     @color='neutral'
     @variant='body2'
+    @emphasis='high'
     title='{{day-js [email protected] format='DD MMM YYYY HH:mm A'}}'
     data-test-pending-request-createdon
   >
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a722a17 and bc819a1.

Files selected for processing (47)
  • app/components/partner/client-info/template.hbs (2 hunks)
  • app/components/partner/client-list/index.hbs (1 hunks)
  • app/components/partner/client-plan/template.hbs (1 hunks)
  • app/components/partner/client-project-detail/index.hbs (1 hunks)
  • app/components/partner/client-project-list/index.hbs (2 hunks)
  • app/components/partner/client-project-list/index.scss (1 hunks)
  • app/components/partner/client-project-list/item/index.hbs (1 hunks)
  • app/components/partner/client-project-list/item/index.scss (1 hunks)
  • app/components/partner/client-report-download/index.hbs (2 hunks)
  • app/components/partner/client-report-download/index.scss (2 hunks)
  • app/components/partner/client-report-download/report-password/index.hbs (2 hunks)
  • app/components/partner/client-report-download/report-password/index.scss (2 hunks)
  • app/components/partner/client-uploads-list/index.hbs (3 hunks)
  • app/components/partner/client-uploads-list/index.scss (1 hunks)
  • app/components/partner/client-uploads-stat-chart/index.hbs (2 hunks)
  • app/components/partner/client-uploads-stat-chart/index.scss (1 hunks)
  • app/components/partner/credit-transfer/credit-transfer-confirm/index.hbs (2 hunks)
  • app/components/partner/credit-transfer/credit-transfer-confirm/index.scss (0 hunks)
  • app/components/partner/credit-transfer/credit-transfer-input/index.hbs (1 hunks)
  • app/components/partner/credit-transfer/credit-transfer-input/index.scss (0 hunks)
  • app/components/partner/credit-transfer/index.hbs (2 hunks)
  • app/components/partner/credit-transfer/index.scss (0 hunks)
  • app/components/partner/export-stats/index.hbs (3 hunks)
  • app/components/partner/invitation-list/index.hbs (2 hunks)
  • app/components/partner/invitation/index.hbs (1 hunks)
  • app/components/partner/invitation/index.scss (1 hunks)
  • app/components/partner/invite-client/index.hbs (2 hunks)
  • app/components/partner/partner-plan/index.hbs (1 hunks)
  • app/components/partner/registration-request-pending-list/index.hbs (2 hunks)
  • app/components/partner/registration-request-pending/index.hbs (1 hunks)
  • app/components/partner/registration-request-pending/index.scss (1 hunks)
  • app/components/partner/registration-request-rejected-list/index.hbs (2 hunks)
  • app/components/partner/registration-request-rejected/index.hbs (1 hunks)
  • app/components/partner/registration-request-rejected/index.scss (1 hunks)
  • app/templates/authenticated/partner/analytics.hbs (1 hunks)
  • app/templates/authenticated/partner/client.hbs (2 hunks)
  • app/templates/authenticated/partner/clients/invitations.hbs (1 hunks)
  • app/templates/authenticated/partner/clients/registration-requests.hbs (1 hunks)
  • app/templates/authenticated/partner/project.hbs (2 hunks)
  • tests/integration/components/partner/client-project-list-test.js (1 hunks)
  • tests/integration/components/partner/client-project-list/item-test.js (1 hunks)
  • tests/integration/components/partner/client-report-download-test.js (1 hunks)
  • tests/integration/components/partner/client-uploads-list/component-test.js (3 hunks)
  • tests/integration/components/partner/credit-transfer/index-test.js (3 hunks)
  • tests/integration/components/partner/invite-client-test.js (6 hunks)
  • tests/integration/components/partner/registration-request-pending-list-test.js (2 hunks)
  • tests/integration/components/partner/registration-request-pending-test.js (2 hunks)
Files not reviewed due to no reviewable changes (3)
  • app/components/partner/credit-transfer/credit-transfer-confirm/index.scss
  • app/components/partner/credit-transfer/credit-transfer-input/index.scss
  • app/components/partner/credit-transfer/index.scss
Files skipped from review due to trivial changes (12)
  • app/components/partner/client-plan/template.hbs
  • app/components/partner/client-uploads-list/index.hbs
  • app/components/partner/export-stats/index.hbs
  • app/components/partner/partner-plan/index.hbs
  • app/templates/authenticated/partner/analytics.hbs
  • app/templates/authenticated/partner/client.hbs
  • app/templates/authenticated/partner/clients/invitations.hbs
  • app/templates/authenticated/partner/clients/registration-requests.hbs
  • app/templates/authenticated/partner/project.hbs
  • tests/integration/components/partner/client-project-list/item-test.js
  • tests/integration/components/partner/invite-client-test.js
  • tests/integration/components/partner/registration-request-pending-test.js
Additional comments not posted (71)
app/components/partner/client-project-detail/index.hbs (1)

2-6: LGTM!

The changes look good and are acceptable. The usage of the AppPlatformIcon component aligns with the past review comment and streamlines the icon rendering process. The AkTypography component enhances the semantic structure of the markup, potentially improving accessibility and styling consistency.

app/components/partner/client-project-list/item/index.scss (1)

12-17: LGTM!

The new button class follows best practices:

  • Uses a descriptive name that follows the BEM naming convention for modularity and reusability.
  • Defines specific styles for height, padding, and border to ensure consistent appearance.
  • Uses a CSS variable for the border color, which promotes consistency and reusability of colors across the application.
app/components/partner/registration-request-rejected/index.scss (1)

13-14: Avoid using !important and verify the color variable.

The usage of !important might lead to specificity issues and make it harder to override the styles in the future. Consider using a more specific selector or increasing the specificity of the selector to avoid using !important.

Also, please verify if the color variable --risk-high is defined in a global stylesheet or a theme file. If not, consider defining it in the appropriate location.

Run the following script to verify the color variable definition:

Verification successful

Avoid using !important and verify the color variable.

The usage of !important might lead to specificity issues and make it harder to override the styles in the future. Consider using a more specific selector or increasing the specificity of the selector to avoid using !important.

The color variable --risk-high is defined in the global stylesheet app/styles/_theme.scss, which is appropriate for maintaining consistent theming across the application.

  • Location of --risk-high definition: app/styles/_theme.scss
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the color variable `--risk-high` is defined in a global stylesheet or a theme file.

# Test: Search for the color variable definition.
rg --type scss $'--risk-high:'

Length of output: 444


Script:

#!/bin/bash
# Description: Verify if the color variable `--risk-high` is defined in a global stylesheet or a theme file.

# Test: Search for the color variable definition.
rg --type scss '--risk-high:'

Length of output: 444


Script:

#!/bin/bash
# Description: Verify if the color variable `--risk-high` is defined in a global stylesheet or a theme file.

# Test: Search for the color variable definition.
rg --type scss -- '--risk-high:'

Length of output: 61


Script:

#!/bin/bash
# Description: Verify if the color variable `--risk-high` is defined in a global stylesheet or a theme file.

# Test: Search for the color variable definition in SCSS files.
fd -e scss | xargs rg '--risk-high:'

Length of output: 451


Script:

#!/bin/bash
# Description: Verify if the color variable `--risk-high` is defined in a global stylesheet or a theme file.

# Test: Search for the color variable definition in SCSS files.
fd -e scss | xargs rg -- '--risk-high:'

Length of output: 86

app/components/partner/registration-request-pending/index.scss (1)

13-15: LGTM, but avoid using !important and verify the impact of the UI changes.

The .invite-btn class is correctly implemented and follows the BEM naming convention. The use of CSS variables for the border and text color is a good practice for maintaining consistency and reusability of styles.

However, the use of !important to override other styles might indicate a specificity issue in the CSS. Consider fixing the specificity issue and avoiding the use of !important.

-.invite-btn {
-  border: 1px solid var(--success-main) !important;
-  color: var(--success-main) !important;
+.invite-btn {
+  border: 1px solid var(--success-main);
+  color: var(--success-main);
}

Also, the removal of the user detail classes (.user, .email, .name, .company, .date) and the addition of the .invite-btn class suggest a significant change in the user interface and functionality. Please verify that these changes align with the intended user experience and do not introduce any regression in the functionality.

app/components/partner/client-project-list/item/index.hbs (3)

1-2: LGTM!

The change from <AkIcon> to <AppPlatformIcon> improves maintainability and consistency. The @platform property binding to @project.platformIcon looks correct.


13-15: Looks good!

The change to <AkTypography> component improves consistency in text styling. Removing the class attribute and retaining local-class aligns well with the scoped styling approach. The added @color and @fontWeight properties enhance the text styling capabilities.


18-27: Great work!

The change from <LinkTo> to <AkLink> component improves consistency in link styling. The @route and @models properties are bound correctly. The added @underline and @color properties enhance the link styling capabilities. Replacing the class attribute with local-class aligns well with the scoped styling approach.

app/components/partner/client-report-download/report-password/index.scss (1)

52-52: LGTM!

Increasing the height of the dropdown tray can enhance the usability by providing more space for the content. The height is now consistent with the password input field as well.

app/components/partner/client-report-download/index.scss (3)

12-14: LGTM!

The changes to the .button-progress class are correctly implemented and align with the PR objectives of migrating global styles in the partner dashboard. The modifications to the disabled state styling provide appropriate visual feedback when the button is not interactive.


41-55: Looks good!

The new .is-progress class is a great addition that enhances the user experience by providing a visual cue for progress. The transition effect for width and the background animation using a gradient effect are implemented correctly and align well with the PR objectives.


57-64: Nice work!

The @keyframes progress animation is defined correctly and works well with the .is-progress class to create the desired gradient effect. The animation enhances the visual feedback for progress indicators, aligning with the PR objectives.

app/components/partner/credit-transfer/credit-transfer-input/index.hbs (1)

35-43: LGTM!

The changes look good:

  • The <button> element has been replaced with an <AkButton> component, which may provide additional styling or functionality.
  • The @variant attribute is used to specify the styling of the button as 'outlined'.
  • The @disabled attribute is correctly bound to a property that likely determines if the input is valid.
  • The click event handler and the data-test-transfer-btn attribute are preserved, maintaining the same functionality and testability.
app/components/partner/registration-request-rejected/index.hbs (4)

2-10: LGTM!

The changes to the user information section improve the layout and styling by using AkStack and AkTypography. The specific properties used for rendering the email and full name enhance readability and prevent text overflow.


12-19: LGTM!

Using AkTypography for rendering the company name ensures consistent styling across the component.


21-28: LGTM!

The changes to the created and updated timestamps improve their styling and visibility by using AkTypography and emphasizing the dates with <em> tags. The addition of data-test attributes is a good practice for enhancing the testability of the component.

Also applies to: 30-37


39-52: LGTM!

Replacing the standard button with an AkIconButton in the action section enhances the visual appeal and interactivity of the interface while maintaining the core functionality of the button.

app/components/partner/registration-request-pending/index.hbs (1)

1-59: Great work on restructuring the template using Atlaskit components!

The changes significantly improve the layout, styling, and consistency of the component. The use of AkStack, AkTypography, and AkButton components enhances the modularity and maintainability of the code. The inclusion of left icons for the action buttons is a nice touch for improving the user experience.

Overall, the changes are well-structured, follow best practices, and align with the project's design system.

app/components/partner/client-project-list/index.scss (1)

80-90: LGTM!

The .badge class is implemented correctly and follows the BEM naming convention. It uses CSS variables for consistent styling and enhances the styling capabilities of the component, allowing for a consistent and visually appealing representation of badge elements within the user interface.

app/components/partner/credit-transfer/index.hbs (1)

17-31: LGTM!

The changes enhance the component's maintainability and visual consistency by:

  • Utilizing the custom AkButton component with properties like @variant, @color, and @disabled.
  • Directly binding the button's disabled state to the this.disableTransfer property for clearer state management.
  • Encapsulating the button's icon and text within the AkButton using the :<leftIcon> and :<default> syntax to streamline the markup and align with the component's design system.
  • Removing the local-class attributes to focus on the component's functionality rather than styling directly in the template.
app/components/partner/client-list/index.hbs (1)

1-1: LGTM! The changes align with a standardized design approach.

The modification of the class attributes from class='padding-h-1 padding-b-2' to class='pb-4 px-2' suggests a move towards a more standardized set of utility classes for padding and spacing. This change can potentially improve the visual consistency of the component across different contexts and enhance the maintainability of the codebase by using a common set of styling classes.

The changes do not introduce any issues or affect the functionality of the component.

app/components/partner/invitation/index.hbs (5)

5-11: LGTM!

The changes to the user information section improve the layout and styling consistency by using the AkStack and AkTypography components. This aligns with best practices for Ember.js applications.


13-15: Looks good!

Displaying the company name using AkTypography ensures uniformity in text presentation.


17-22: Nice work!

The modifications to the date display, utilizing AkTypography and formatting the date as an emphasized text element, improve the visual presentation.


26-32: Great job!

Streamlining the conditional rendering for expired invitations by replacing the <div> elements with AkTypography improves the visual hierarchy and maintainability of the code. The inclusion of color and variant specifications enhances the overall presentation.

Also applies to: 34-39


49-67: Excellent improvements!

Updating the tooltip buttons for resending and deleting invitations to use AkIconButton enhances accessibility and interaction design. Wrapping the buttons in an AkStack component improves the layout and responsiveness, making the overall design more user-friendly and visually appealing.

app/components/partner/client-uploads-stat-chart/index.hbs (1)

Line range hint 51-60: LGTM!

The change to use the <AkButton> component instead of standard <button> elements is a good enhancement. It improves the component's functionality while maintaining the existing behavior of applying the "active" class based on the current timeline key.

app/components/partner/client-uploads-list/index.scss (1)

133-143: LGTM!

The .badge class is a new addition that follows the existing coding conventions and best practices. The styles are scoped to the class and use CSS variables for consistency. The class name follows the BEM naming convention. Overall, the code changes look good!

app/components/partner/client-report-download/report-password/index.hbs (2)

9-16: LGTM!

The usage of the AkIconButton component is correct and enhances the UI consistency by utilizing a predefined component from the Ak component library.


48-63: LGTM!

The usage of the AkButton component is correct and improves the semantic structure of the button by separating the icon and text into designated slots (:leftIcon and :default). This change may enhance accessibility and maintainability.

app/components/partner/registration-request-rejected-list/index.hbs (5)

14-14: LGTM!

The update to the margin class aligns with the usage of Tailwind CSS utility classes and maintains consistent vertical spacing. Good catch!


19-22: Nice work!

The usage of the AkTypography component for the table header enhances the semantic structure and styling capabilities. It's a great way to improve consistency and maintainability in the UI. Well done!


24-26: Also applies to: 28-30, 32-34


36-36: What is the purpose of the empty cell?

I noticed that the last header cell is an empty <div>. Could you please clarify the purpose of this cell? If it serves no specific purpose, consider removing it to simplify the table structure and improve readability.


Line range hint 1-13: Verify the usage of the removed class.

The removal of the pending-registration-requests class looks good. However, please ensure that this class is not used elsewhere in the codebase to style or select this component, as it could lead to unintended visual changes or broken selectors.

Run the following script to verify the class usage:

Verification successful

Class Removal Verified: No Usage Found Elsewhere
The pending-registration-requests class, removed from the Handlebars template, is not used elsewhere in the codebase, including CSS and JavaScript files. This confirms that its removal will not lead to unintended visual changes or broken selectors.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the removed class is used elsewhere in the codebase.

# Test: Search for the class usage. Expect: No occurrences of the class.
rg --type-add 'template:*.hbs' --type template $'pending-registration-requests'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify if the removed class is used in CSS or JavaScript files.

# Test: Search for the class usage in CSS files.
rg --type css 'pending-registration-requests'

# Test: Search for the class usage in JavaScript files.
rg --type js 'pending-registration-requests'

Length of output: 90

app/components/partner/credit-transfer/credit-transfer-confirm/index.hbs (3)

20-21: LGTM!

The replacement of the <div class='divider'> with the <AkDivider> component provides a more standardized styling approach and improves maintainability. The my-2 class and @color='dark' attribute enhance the visual consistency of the divider.


29-29: LGTM!

The conditional addition of the empty-title class to the local-class attribute enhances the visual styling of the client name value when it is empty, while preserving the existing rendering logic.


57-86: LGTM!

The refactoring of the action buttons using the <AkStack> and <AkButton> components improves the layout, spacing, and visual styling of the buttons. The <AkStack> component provides a more flexible and responsive layout with attributes for justifying content, aligning items, spacing, and width. The <AkButton> components enhance the functionality and styling of the buttons with the @variant and @color attributes.

The existing logic for rendering the buttons based on the @transferCredits and @toggleMode values is preserved, ensuring the functionality of confirming transfers and toggling modes remains intact.

app/components/partner/client-info/template.hbs (2)

28-30: LGTM!

The change from using an <em> tag to the AkTypography component for displaying the "No uploads" text is a good improvement. It enhances the semantic structure of the markup and likely improves consistency and maintainability by utilizing a component designed for typography.


82-90: Looks good!

The shift from using a LinkTo component to an AkLink component for the detail page link, along with the introduction of the AkButton component, is a positive change. It reflects a move towards using more specialized components for rendering UI elements, which likely aims to improve the user experience and code maintainability.

The button's visual presentation is enhanced with specified variants and colors, and setting its minimum width explicitly may contribute to a more uniform layout. The usage of the components looks correct.

app/components/partner/registration-request-pending-list/index.hbs (3)

36-39: LGTM!

Using the AkTypography component for rendering the column title is a good practice. It improves the semantic structure of the markup and likely enhances styling consistency across the application. The @fontWeight and @color attributes are appropriately set for a column title.


41-43: LGTM!

Using the AkTypography component for rendering the column title is a good practice. It improves the semantic structure of the markup and likely enhances styling consistency across the application. The @fontWeight and @color attributes are appropriately set for a column title.


45-47: LGTM!

Using the AkTypography component for rendering the column title is a good practice. It improves the semantic structure of the markup and likely enhances styling consistency across the application. The @fontWeight and @color attributes are appropriately set for a column title.

app/components/partner/invitation-list/index.hbs (5)

31-33: LGTM!

The change improves the semantic structure and styling consistency by using the <AkTypography> component for the "Invitee" table header.


35-37: LGTM!

The change improves the semantic structure and styling consistency by using the <AkTypography> component for the "Company" table header.


39-41: LGTM!

The change improves the semantic structure and styling consistency by using the <AkTypography> component for the "Invited" table header.


43-45: LGTM!

The change improves the semantic structure and styling consistency by using the <AkTypography> component for the "Expires On" table header.


47-49: LGTM!

The change improves the semantic structure and styling consistency by using the <AkTypography> component for the "Source" table header.

app/components/partner/invite-client/index.hbs (5)

1-13: LGTM!

The AkButton component usage looks good. It follows the best practices by using the t helper for internationalization and providing a left icon for better visual representation.


27-39: LGTM!

The AkTextField component usage for the email input field looks good. It follows the best practices by:

  • Using the t helper for internationalization of the label and placeholder.
  • Correctly wiring up the error handling and helper text with the changeset.
  • Marking the field as required.

41-67: LGTM!

The usage of AkStack for laying out the first name and last name input fields is a good practice for consistent spacing and alignment. The AkTextField components within the stack are also correctly configured with labels, placeholders, error handling, and helper text.


69-83: LGTM!

The AkTextField component usage for the company name input field looks good, similar to the email input field. It follows the best practices by using the t helper for internationalization, correctly wiring up the error handling and helper text with the changeset, and marking the field as required.


85-93: LGTM!

The AkButton component usage for sending the invitation looks good. It follows the best practices by:

  • Disabling the button during the sendInvite action to prevent multiple submissions.
  • Using the t helper for internationalization of the button text.
  • Providing a left icon for better visual representation.
app/components/partner/client-project-list/index.hbs (4)

6-14: LGTM!

The usage of the <AkStack> component to display the project count is a good change. It improves the visual consistency of the application and leverages the alignment functionality provided by the Ak library.


50-56: LGTM!

The usage of the <AkTypography> component for the "Platform" table header item is a good change. It enhances the text styling by applying a bold font weight and ensures a more consistent typographic hierarchy across the application.


58-64: LGTM!

The usage of the <AkTypography> component for the "Package Name" table header item is a good change. It enhances the text styling by applying a bold font weight and ensures a more consistent typographic hierarchy across the application.


66-72: LGTM!

The usage of the <AkTypography> component for the "Created On" table header item is a good change. It enhances the text styling by applying a bold font weight and ensures a more consistent typographic hierarchy across the application.

app/components/partner/client-report-download/index.hbs (2)

33-73: LGTM!

The refactoring of the download button to use the <AkButton> component and the improved structure for conditionally rendering the icon and labels enhances the code maintainability and likely improves the visual consistency and functionality. The changes are well-implemented and the logic for displaying the generating state remains intact.


93-101: Looks good!

The transition of the generate button from a standard <button> to an <AkIconButton> maintains the same functionality while potentially offering better integration with the UI framework. The button's disabled state is preserved, ensuring that the user experience remains consistent.

tests/integration/components/partner/client-project-list-test.js (1)

113-115: LGTM!

The change to use a more specific selector for querying the table header items is a good improvement. It makes the test more robust by accurately reflecting the intended DOM structure and validating the presence of the correct number of header items.

tests/integration/components/partner/registration-request-pending-list-test.js (4)

134-135: LGTM!

The assertions correctly check for the presence of specific substrings in the first header cell, enhancing the flexibility of the test.


136-138: LGTM!

The assertions correctly use strictEqual instead of equal, enforcing stricter equality checks and addressing the past review comments.


185-185: LGTM!

The assertion correctly uses strictEqual instead of equal, aligning with the updated assertion style for consistency across the test and addressing the past review comments.


Line range hint 1-133: LGTM!

The remaining code changes are correctly implemented and do not require any further comments.

Also applies to: 139-184, 186-309

tests/integration/components/partner/client-uploads-list/component-test.js (4)

136-138: LGTM!

The change to use a more specific attribute selector [data-test-table-header-item] for querying the table headers is a good improvement. It makes the test more precise and less likely to break if the DOM structure changes.


327-329: Looks good!

The selector change here is consistent with the previous modification and improves the test's precision. Good catch!


402-404: Looks good to me!

The selector update here maintains consistency with the previous changes and improves the test's precision. Nice work!


Line range hint 1-426: Overall, the changes in this file look great!

The updates to the selectors used in the assertions for querying table headers are consistent and improve the precision and reliability of the tests. By using more specific attribute selectors like [data-test-table-header-item], the tests are less likely to break if the DOM structure changes and are more focused on the relevant elements.

The changes align with best practices for writing robust and maintainable tests. Great job!

tests/integration/components/partner/credit-transfer/index-test.js (3)

176-176: LGTM!

The assertion correctly uses the isDisabled() method to check the button state, which aligns with the changes mentioned in the AI-generated summary.


219-219: LGTM!

The assertion correctly uses the isDisabled() method to check the button state, which aligns with the changes mentioned in the AI-generated summary.


262-263: LGTM!

The assertion correctly uses the isNotDisabled() method to check the button state, which aligns with the changes mentioned in the AI-generated summary.

tests/integration/components/partner/client-report-download-test.js (1)

238-238: LGTM!

The change to reference the CSS class from a centralized styles object is a good refactor for maintainability and consistency. The test functionality remains unaffected.

@future-pirate-king future-pirate-king merged commit 3e3c045 into develop Sep 13, 2024
7 checks passed
@future-pirate-king future-pirate-king deleted the PD-1430-partner-dashboard-styles-refactor branch September 13, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants